﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=1">
    <meta name="format-detection" content="telephone=no">
    <meta charset="UTF-8">
    <title>基础指令</title>
    <link rel="stylesheet" href="../css/bootstrap.css"/>
    <script src="../js/jquery-2.2.0.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>
</head>
<body>
    <h1>基础指令</h1><br/>

    <div id="app">
        <input v-model="name"/>
        {{name}}
        <!--该上{{}}出现在页面上，作用和{{name}}一样-->
        <div v-text="name"></div>
        <!--单向绑定v-once-->
        <div v-once>{{name}}</div>

        <!--把html当html元素渲染-->
        <div v-html="p"></div>
    </div>
<script src="../js/vue-2.5.16.js"></script>
<script src="../node_modules/axios/dist/axios.js"></script>
<script src="../node_modules/lodash/lodash.js"></script>

<script>
    var app = new Vue({
        el:'#app',
        data:{
            name:'模版数据',
            p:'<button>btn</button>'
        }
    });
</script>

</body>
</html>